package com.demo.bean.service.impl.news;

import com.demo.bean.mapper.news.NewsMapper;
import com.demo.bean.service.news.NewsService;
import com.demo.common.entity.News;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * 新闻动态
 * 作者：张佑威
 * 补充：孙佳佳
 */
@Service
public class NewsServiceImpl implements NewsService {
    @Autowired
    private NewsMapper newsMapper;

    @Override
    public News selectByNewsId(Integer NewsId) {
        return newsMapper.selectByNewsId(NewsId);
    }

    @Override
    public List<News> newsproduct(Integer id, Integer pagenum) {
        return newsMapper.newsproduct(id,pagenum);
    }

    @Override
    public List<News> search(Integer pagenum) {
        return newsMapper.search(pagenum);
    }
}
